module.exports = () => {
    return async (ctx,next) => {
        if(ctx.method === 'GET' || ctx.method === 'DELETE'){
            ctx.params = {...ctx.params,...ctx.query};
        }else if(ctx.method === 'POST' || ctx.method === 'PUT'){
            ctx.params = {...ctx.params,...ctx.request.body};
        }
        await next();
    }
}